﻿/* ######################################## *\
 * ### Copyright (C) 2009 AJ Ravindiran ### *
 * ### HTTP://THEAJ.NET/ <AJ@THEAJ.NET> ### *
\* ######################################## */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AJRavindiran.Jolt.Utilities
{
    public static class TimeUtilities
    {
        /// <summary>
        /// Alternative <code>getCurrentMilli</code> from Java.
        /// </summary>
        /// <returns>Returns the current date milliseconds</returns>
        public static double GetCurrentMilliseconds()
        {
            DateTime staticDate = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
            TimeSpan timeSpan = DateTime.UtcNow - staticDate;
            return timeSpan.TotalMilliseconds;
        }
    }
}
